# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at https://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""
# Generated by Django 2.2.8 on 2020-09-27 01:39

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("node_man", "0014_auto_20200818_1114"),
    ]

    operations = [
        migrations.CreateModel(
            name="PushFileRecord",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("subscription_id", models.IntegerField(db_index=True, verbose_name="订阅ID")),
                ("task_id", models.IntegerField(db_index=True, verbose_name="订阅任务ID")),
                ("record_id", models.IntegerField(db_index=True, verbose_name="订阅任务记录ID")),
                ("ip", models.CharField(db_index=True, max_length=45, verbose_name="内网IP")),
                ("bk_cloud_id", models.IntegerField(db_index=True, verbose_name="管控区域ID")),
                (
                    "os_type",
                    models.CharField(
                        choices=[("LINUX", "LINUX"), ("WINDOWS", "WINDOWS"), ("AIX", "AIX")],
                        db_index=True,
                        default="LINUX",
                        max_length=45,
                        verbose_name="操作系统",
                    ),
                ),
                ("file_source_path", models.CharField(max_length=128, verbose_name="源文件路径")),
                ("update_time", models.DateTimeField(auto_now=True, db_index=True, verbose_name="更新时间")),
                ("create_time", models.DateTimeField(auto_now_add=True, db_index=True, verbose_name="创建时间")),
                ("job_instance_id", models.IntegerField(blank=True, null=True, verbose_name="作业实例ID")),
                (
                    "ip_status",
                    models.CharField(
                        choices=[
                            ("success", "success"),
                            ("pending", "pending"),
                            ("failed", "failed"),
                            ("not_job", "not_job"),
                        ],
                        default="not_job",
                        max_length=10,
                        verbose_name="作业IP执行状态",
                    ),
                ),
                ("is_finished", models.BooleanField(default=False, verbose_name="作业是否已完成")),
                (
                    "job_polling_time",
                    models.DateTimeField(blank=True, db_index=True, null=True, verbose_name="作业主动轮询时间"),
                ),
            ],
        ),
    ]
